{% extends 'admin/base.html' %}
{% block style %}
    {{ super() }}
{% endblock %}
{% block main %}
    {{ super() }}

    <div class="layui-fluid">
        <div class="layui-row layui-col-space10">

            <div class="layui-col-lg3"></div>

            <div class="layui-col-lg6">

                <form class="layui-form layui-form-pane" action="/admin/register" method="post">
                    {{ register_form.csrf_token }}
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名</label>
                        <div class="layui-input-block">
                            {{ register_form.username(class="layui-input",placeholder="请输入用户名") }}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><p>昵称</p></label>
                        <div class="layui-input-block">
                            {{ register_form.nickname(class="layui-input",placeholder="请输入用户昵称") }}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-block">
                            {{ register_form.password(class="layui-input",placeholder="请输入密码") }}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">确认密码</label>
                        <div class="layui-input-block">
                            {{ register_form.password2(class="layui-input",placeholder="请再次确认密码") }}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮箱</label>
                        <div class="layui-input-block">
                            {{ register_form.email(class="layui-input",placeholder="请输入邮箱") }}
                            <label>{{ register_form.email.errors[0] }}</label>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="submit" class="layui-btn" lay-submit="">注册</button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="layui-col-lg3"></div>

        </div>
    </div>
{% endblock %}